package com.lh.java.javamail;

import com.lh.jsp.urlparamEncoding.CharacterEncodingConstants;

/**
 * <p>
 * title: 简易mailbean
 * </p>
 * <p>
 * description: 提供简便的mail发送功能（/p>
 * <p>
 * copyright: copyright (c) 2003
 * </p>
 * 
 * @version 1.0
 */

class ExtendString {
	public ExtendString() {
	}

	/**
	 * 去掉字符串两端的空白字符,并将字符串转化为中国的标准字符gb2312的字符串.
	 */
	public String cs(String str) { // 去掉字符串2端的空白字符
		try {
			if (str == null)
				return "";
			str = str.trim();
			if (str == null)
				return "";
			str = new String(str.getBytes(CharacterEncodingConstants.IOS8859),CharacterEncodingConstants.UTF8);
		} catch (Exception e) {
			System.out.println(e);
		}
		return str;
	}

}